<link href="/static/thinkct/css/basic.css?v=1" rel="stylesheet" type="text/css" /><script language="javascript" src="/static/thinkct/js/jquery.m.js"></script><script language="javascript" src="/static/thinkct/js/layui/layui.js"></script><script language="javascript" src="/static/thinkct/js/common.js?v=1"></script><script language="javascript" src="/static/thinkct/js/member.js?v=1"></script><link href="/static/thinkct/css/member.css?v=1" rel="stylesheet" type="text/css" /><link href="/static/thinkct/js/layui/css/layui.css" rel="stylesheet" type="text/css" /><script language="javascript" src="/static/thinkct/js/plupload.js"></script><script language="javascript" src="/static/thinkct/js/upload.js"></script><form class="layui-form layui-font14" action="/member/setup/slide" method="post" enctype="multipart/form-data">
<div class="layui-form-item">
    <label class="layui-form-label">幻灯片</label>
    <div class="layui-input-block">
	<div class="layui-box layui-upload-button">
	<input type="file" name="file" id="picinp" class="layui-upload-file" {if($row['file']==null)}lay-verify="required"{/if} accept="image/png,image/jpeg,image/gif" onchange="checkfile(this,'pic')"><span class="layui-upload-icon"><i class="layui-icon"></i>选择图片</span></div>
	<div class="layui-inline"><div class="layui-form-mid layui-word-aux">尺寸必须为1190x300（否则不予上传）；大小上限1MB；格式JPG,GIF,PNG</div></div>
	<div class="layui-inline"><div class="layui-form-mid layui-word-aux " style="color:red"></div></div>
	<br><i></i>
	<div class="div_preview" pixel_data='2' w='1190' h='300' size_data="1024000"  style="width:850px;height:214px;{if($row.file!=null)}height:214px;background-image:url({$row.file});
	-moz-background-size: 100% 100%; 
	-o-background-size: 100% 100%; 
	-webkit-background-size: 100% 100%; 
	background-size: 100% 100%; 
	-moz-border-image: url({$row.file}) 0; 
	background-repeat:no-repeat\9; 
	background-image:none\9; 
	filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='//iu.huzhan.com/slide/1599555579694.png', sizingMethod='scale')\9;
	{/if}" id="pic">
	<img src=""></div>
	</div>
</div>


<div class="layui-form-item">
    <label class="layui-form-label">链接地址</label>
    <div class="layui-inline">
	<input name="link" class="layui-input" value="{if($row.link==null)}http://{else}{$row.link}{/if}" lay-verify="link" maxlength="50" size="50" type="text">
    </div>
		<div class="layui-inline"><div class="layui-form-mid layui-word-aux">只能添加【{:sysconf('site_name')}】站内链接</div></div>

</div>

<div class="layui-form-item" style="padding-bottom:15px;">
    <label class="layui-form-label"></label>
    <div class="layui-input-block"><input type="submit" class="layui-btn" lay-submit="" lay-filter="slide"  value="确认提交" /></div>
</div>
<input type="hidden" value="{$row.id}" name="id" />
<input type="hidden" value="{$action}" name="data" />
<input type="hidden" value="slide" name="object" />
</form>

<script language="javascript">
 layui.use('form', function(){
  var form = layui.form();
	 form.verify({
		title: function(value){
			  if(value.length<2 || value.length>7) return "【连接名称】字数需为2~6位";
		},
		link: function(value){
			  if((value.substring(0,7).indexOf("http://")==-1 && value.substring(0,8).indexOf("https://")==-1)|| value.substring(0,24).indexOf("{:sysconf('site_domain')}")==-1) return "【连接地址】需为【{:sysconf('site_name')}】站内链接，且需以http://或https://开头";
		}
	});

	form.on('submit(slide)', function(data) {
		progress(true);
		return true;
	});

 });
</script>